package ModelLayer;


/**
 * Write a description of class Group here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Group
{
    private String name;
    private String terms_of_payment;
    private double discount;
    

    /**
     * Constructor for objects of class Group
     */
    public Group(String i_name, String i_terms, double i_discount)
    {
        name = i_name;
        terms_of_payment = i_terms;
        discount = i_discount;
    }
    public void set_name(String i_name)
    {
        name = i_name;
    }
    public void set_terms(String i_terms)
    {
        terms_of_payment = i_terms;
    }
    public void set_discount(double i_discount)
    {
        discount = i_discount;
    }
    public String get_name()
    {
        return name;
    }
    public String get_terms()
    {
        return terms_of_payment;
    }
    public double get_discount()
    {
        return discount;
    }
    
    public String printable()
    {
        return String.format("Group:\t\t\t%s\nTerms of payment:\t%s\nDiscount:\t\t%s%%", name, terms_of_payment, discount);
    }
    public Object[] give_array()
    {
    	Object[] attributes = { get_name(), get_terms(), get_discount()};
    	return attributes;
    }
    public String give_string_data()
    {        
        return String.format("%s\t%s\t%s", name, terms_of_payment, discount);        
    }
    
}
